import { Color, Size, Vec2 } from "cc"

export const MAP_WIDTH = 85
export const MAP_HEIGHT = 104
export const OVER_LINE = 86 //超过这条线就狗带
export const MAX_SHAPE_SIZE = new Size(32, 16)
export const SHAPES = [
    {
        id: 1,
        width: 24,
        height: 14,
        offset: [
                {start: 8, length: 8},
                {start: 8, length: 8},
                {start: 8, length: 8},
                {start: 8, length: 8},
                {start: 8, length: 8},
                {start: 8, length: 8},
                {start: 8, length: 8},
            {start: 0,           length: 24},
            {start: 0,           length: 24},
            {start: 0,           length: 24},
            {start: 0,           length: 24},
            {start: 0,           length: 24},
            {start: 0,           length: 24},
            {start: 0,           length: 24},
        ]
    },
    {
        id: 2,
        width: 24,
        height: 14,
        offset: [
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},

                        {start: 8, length: 16},
                        {start: 8, length: 16},
                        {start: 8, length: 16},
                        {start: 8, length: 16},
                        {start: 8, length: 16},
                        {start: 8, length: 16},
                        {start: 8, length: 16},
        ]
    },
    {
        id: 3,
        width: 24,
        height: 14,
        offset: [
                        {start: 8, length: 16},
                        {start: 8, length: 16},
                        {start: 8, length: 16},
                        {start: 8, length: 16},
                        {start: 8, length: 16},
                        {start: 8, length: 16},
                        {start: 8, length: 16},

            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
        ]
    },
    {
        id: 4,
        width: 16,
        height: 16,
        offset: [
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},

            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
            {start: 0, length: 16},
        ]
    },
    {
        id: 5,
        width: 24,
        height: 14,
        offset: [
            {start: 0, length: 8},
            {start: 0, length: 8},
            {start: 0, length: 8},
            {start: 0, length: 8},
            {start: 0, length: 8},
            {start: 0, length: 8},
            {start: 0, length: 8},

            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
        ]                           
    },
    {
        id: 6,
        width: 24,
        height: 14,
        offset: [
                                      {start: 16, length: 8},
                                      {start: 16, length: 8},
                                      {start: 16, length: 8},
                                      {start: 16, length: 8},
                                      {start: 16, length: 8},
                                      {start: 16, length: 8},
                                      {start: 16, length: 8},

            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
            {start: 0,                          length: 24},
        ]
    },
    {
        id: 7,
        width: 32,
        height: 8,
        offset: [
            {start: 0, length: 32},
            {start: 0, length: 32},
            {start: 0, length: 32},
            {start: 0, length: 32},
            {start: 0, length: 32},
            {start: 0, length: 32},
            {start: 0, length: 32},
        ]
    },
]

export const PixelBlockWidth = 12 //格子宽高
export const OutlineWidth = 1 //颜色格外边框宽度

export const ColorList = [
    {color: [Color.BLACK, Color.WHITE, Color.BLACK, Color.BLACK], type: 0},
    {color: [new Color('c8363c'), new Color('c43d43'), new Color('b72c32'), new Color('dc484f')], outline: new Color('b53338'), type: 1}, //红
    {color: [new Color('e0b828'), new Color('d7a938'), new Color('d39d18'), new Color('edc050')], outline: new Color('d3a535'), type: 2}, //黄 
    {color: [new Color('41d5fe'), new Color('35c2eb'), new Color('17a9fd'), new Color('3db2f5')], outline: new Color('43bfe5'), type: 3}, //浅蓝
    {color: [new Color('4360f6'), new Color('3854e3'), new Color('293ff2'), new Color('364aee')], outline: new Color('43bfe5'), type: 4}, //深蓝
    {color: [new Color('21ba31'), new Color('29aa33'), new Color('139f1d'), new Color('19a623')], outline: new Color('1fb22e'), type: 5}, //绿
    {color: [new Color('fc7e17'), new Color('e96d2f'), new Color('fb5907'), new Color('ec631e')], outline: new Color('e3752d'), type: 6}, //橙
    {color: [new Color('9353e9'), new Color('733de9'), new Color('622bdb'), new Color('6a33e3')], outline: new Color('8956cc'), type: 7}, //紫
    {color: [new Color('ed58c1'), new Color('e746b7'), new Color('db2ba7'), new Color('dc37ab')], outline: new Color('cd41a4'), type: 8}, //粉
    {color: [Color.BLACK, Color.WHITE, Color.BLACK, Color.BLACK], type: 0}, //占位
]